package com.dl.base.ui.adapter

import androidx.recyclerview.widget.DiffUtil

class DiffDemoCallback<T : BaseAdapterData> : DiffUtil.ItemCallback<T>() {
    override fun areItemsTheSame(oldItem: T, newItem: T): Boolean {
        return oldItem.diffId == newItem.diffId
    }

    override fun areContentsTheSame(oldItem: T, newItem: T): Boolean {
        return oldItem.hashCode() == newItem.hashCode()
    }
}